--Same as the character select
local characters = {"Arcueid"}
local selectedCharacter = 1;
_G.CurrentCharacterArcade = characters[selectedCharacter];

local t = Def.ActorFrame{
	CodeMessageCommand=function(self,param)
		local ch = self:GetChild("Chapter");
		local crs = self:GetChild("Course");
		
		if param.Name == "Left" then
			if _G.currentStoryChapter > 1 then
				_G.currentStoryChapter = _G.currentStoryChapter - 1;
			end
		elseif param.Name == "Right" then
			if _G.currentStoryChapter < 7 then
				_G.currentStoryChapter = _G.currentStoryChapter + 1;
			end;
		elseif param.Name == "Up" then
			if selectedCharacter > 1 then
				selectedCharacter = selectedCharacter - 1;
				_G.CurrentCharacterArcade = characters[selectedCharacter];
			end
		elseif param.Name == "Down" then
			if selectedCharacter < #characters then
				selectedCharacter = selectedCharacter + 1;
				_G.CurrentCharacterArcade = characters[selectedCharacter];
			end;
		elseif param.Name == "Start" then
			SCREENMAN:GetTopScreen():StartTransitioningScreen("SM_GoToNextScreen");
		elseif param.Name == "Back" then
			SCREENMAN:GetTopScreen():StartTransitioningScreen("SM_GoToPrevScreen");
		else
			SCREENMAN:SystemMessage("Unknown button: "..param.Name)
		end;
		ch:settext("Selected chapter: ".._G.currentStoryChapter.." out of 6");
		crs:settext("Selected character: "..characters[selectedCharacter].." ("..selectedCharacter.." out of "..#characters..")");
			
	end;
		
	LoadFont("Common Normal")..{
		Text="Select a course with up/down and a chapter using left/right, then press start to test.";
		Name="Info";
		InitCommand=cmd(Center;addy,-20);
	};
	LoadFont("Common Normal")..{
		Text="Selected character: "..characters[1].." (1 out of "..#characters..")";
		Name="Course";
		InitCommand=cmd(Center;addy,10);
	
	};
	LoadFont("Common Normal")..{
		Text="Selected chapter: ".._G.currentStoryChapter.." out of 6";
		Name="Chapter";
		InitCommand=cmd(Center;addy,30);

	};
};

return t;
